A Recursive Algorithm for Triangulation of Arbitrary Polygon Based on Bsp Tree
نویسنده
چکیده
Triangulation of polygon is of very importance in three-dimensional software applications. An algorithm for triangulation of polygon based on binary space-partitioning (BSP) tree idea is proposed in this paper. That is, this algorithm implements triangulation of poly-gon with recursive method according to BSP tree structure. It is suitable for not only simple polygons with arbitrary convex or conca-ve shapes but also complex polygons with islands. Moreover, taking into account elevation, it is also completely suitable for three-di-mensional representation for long-distance streams with terrain undulation. Triangle is the simplest polygon in computer graphics. Most polygonal surfaces are rendered via triangles in many popular 3D rendering Engines such as OpenGL and Direct3D. Therefore, polygons must be correctly triangulated before rendering. Some algorithms for triangulation of simple polygon were put forward. Nevertheless, they could not be applied perfectly for polygons of buildings, roads and rivers, and so on, in 3D Geo graphical Information Systems (GIS) on account of polygonal terrain feature and complexity. A recursive algorithm for triangulation of polygon based on binary space partitioning (BSP) tree is proposed in this paper. That is, this algorithm implements triangulation of polygon with recursive method according to BSP tree structure. It is suitable for not only simple polygons with arbitrary convex or concave shapes but also polygons with islands. Moreover, taking into account elevation, it is also completely suitable for three-dimensional representation for long-distance streams with terrain undulation. 1. PARTITION PRINCIPLE For a polygon with n vertices, correct triangulation should conform to principles as follows: (1) Each triangle vertex should also be one of the polygon’s; (2) All triangles could not intersect the polygon; (3) All triangles should lie inside the polygon; (4) Triangle number should be n-2; We first introduce related concepts in this context as follows: Intersection between two line segments: If intersection point lies in between two endpoints of two line segments individually, then there exists intersection between the two line segments, otherwise, if not, called no intersection. Line segment inside a polygon: If two endpoints of a line segment lie inside a polygon, then the line segment is in the polygon. Similarly, if a triangle is called inside a polygon, it means all the boundaries of this triangle are either on or inside the polygon. If not, we call that the line segment or triangle is outside of the polygon. Correct triangle: If a triangle not only lies inside a polygon, but also does not intersect the polygon, then it is called a correct triangle. 2. TRIANGULATION ALGORITHM First, we discuss the algorithm idea as follows: 2.1 Algorithm Idea 2.1.1 BSP Concept In data structure theory, the tree structure characteristics are: it is a node set starting from the only start node called root one. A node may be regarded as a parent, which points to zero, one or more nodes called children. A node without child is called leaf. The root node has no parent. BSP tree has such particular characteristics: each node has zero, one or two children, left node is called left child, and right node is called right child. 2.1.2 BSP Tree Structure of Triangulation There might be many possible results of triangulation of polygon. After carrying out comprehensive analyses and studies, the author draws the conclusion that polygon could be triangulated according to BSP tree idea, that is, a polygon may be subdivided into a triangle mesh according to BSP tree structure. We will discuss how to triangulate a polygon according to BSP tree structure below. First, we set up a correct triangle, the root node of the BSP tree, with two adjacent vertices and another vertex in the polygonal vertex sequence. Obviously, the root triangle divides the primitive polygon into one or two sub-polygons except for this triangle, which lie in two sides of the triangle respectively. Then, we subdivide the two sub-polygons, respectively, thus, to generate left and right child triangles of the root triangle. Surface
منابع مشابه
A New Heuristic Algorithm for Drawing Binary Trees within Arbitrary Polygons Based on Center of Gravity
Graphs have enormous usage in software engineering, network and electrical engineering. In fact graphs drawing is a geometrically representation of information. Among graphs, trees are concentrated because of their ability in hierarchical extension as well as processing VLSI circuit. Many algorithms have been proposed for drawing binary trees within polygons. However these algorithms generate b...
متن کاملA Contribution to Triangulation Algorithms for Simple Polygons
Decomposing simple polygon into simpler components is one of the basic tasks in computational geometry and its applications. The most important simple polygon decomposition is triangulation. The known algorithms for polygon triangulation can be classified into three groups: algorithms based on diagonal inserting, algorithms based on Delaunay triangulation, and the algorithms using Steiner point...
متن کاملAn Efficient CGM-Based Parallel Algorithm Solving the Matrix Chain Ordering Problem
This study focuses on the parallel resolution of the matrix chain ordering problem and the optimal convex polygon triangulation problem on the Coarse grain multicomputer model (CGM for short). There has been intensive work on the parallelization of these dynamic programming problems in PRAM, including the use of systolic arrays, but a BSP/CGM solution is necessary for ease of implementation and...
متن کاملConversion of Binary Space
Binary Space Partitioning Trees (BSP-Trees) have been proposed as an alternative way to represent polytopes based on the spatial subdivision paradigm. Algorithms that convert from Boundary Representation (BRep) to BSP-Trees have been proposed, but none is known to perform the opposite conversion. In this paper we present such an algorithm , that takes as input a BSP-Tree representation for a po...
متن کاملCoarse Grained Parallel Next Element Search
We present a parallel algorithm for solving the next element search problem on a set of line segments, using a BSP like model referred to as the Coarse Grained Multicomputer (CGM). The algorithm requires O(1) communication rounds (h-relations with h=O(n/p)), O((n/ p) log n) local computation, and O((n/p) log n) storage per processor. Our result implies solutions to the point location, trapezoid...
متن کامل